package contrl

import (
	"db"
	"github.com/gin-gonic/gin"
)

type DebugContrl struct{}

func (*DebugContrl) Sync(c *gin.Context) (res interface{}, e Error) {
	uid := GetInt64(c, "uid")
	err := db.PushToSyncList(&db.ModelData{Key: db.PicUploadModelKey, UID: uid})
	if err != nil {
		return nil, GenError(err)
	}
	err = db.PushToSyncList(&db.ModelData{Key: db.PicUploadModelAccessKey, UID: uid})
	if err != nil {
		return nil, GenError(err)
	}
	res = "ok"
	return
}
